#include "widget.h"
#include "ui_widget.h"

#include <QtDebug>
#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

//    QPushButton* btn = new QPushButton(this);
//    resize(800, 600);

//    btn->move(200, 200);

//    connect(btn, &QPushButton::clicked, this, &Widget::EmitSignal);
    connect(ui->pushButton, &QPushButton::clicked, this, &Widget::MySlot);
    connect(this, &Widget::MySignal, this, &Widget::MySlot);

//   EmitSignal();
}

Widget::~Widget()
{
    delete ui;
}

void Widget::EmitSignal()
{
    emit MySignal();
}

void Widget::MySlot()
{
    qDebug() << "杨惠雯";
}

